-- 数值 for
function f(x)
    print("function")
    return x*2
end

-- f(5) 只会执行一次
-- i 是局部变量
for i = 1, f(5), 2 do
    print(i)
end

if(i) then
    print("i = " .. i)
else
    print(i)
end

-- 泛型 for
days = {"Suanday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"}  
-- i 从 1 开始, i 是局部变量
for i, v in ipairs(days) do
    print(i .. ": " .. v)
end
